import request from '@/utils/request'

export default {
  //模糊
  getSubjectLike(url){
    return request({
      url: url,
      headers:{
        isTaken: true
      },
      method: 'get'
    })
  },
  //查
  getChildList(id) {
    return request({
      url: `/subject/${id}`,
      headers:{
        isTaken: true
      },
      method: 'get'
    })
  },
  //删
  deleteSubject(id){
    return request({
      url:'/subject/'+id,
      headers:{
        isTaken: true
      },
      method: 'delete',
    })
  },
  //增
  insertSubject(data){
    return request({
      url:'/subject',
      headers: {
        isTaken: true
      },
      data:data,
      method: 'post',
    })
  },
  //改
  editSubject(data){
    return request({
      url:'/subject',
      headers:{
        isTaken: true
      },
      data:data,
      method: 'put',
    })
  }
}
